<?php
namespace app\model;

use think\Model;

class User extends Model
{
    protected $table='users';
    public function login($account, $password)
    {
        $data = User::where(['account'=>$account,'passwd'=>$password])->select();
        return !$data->isEmpty();
    }
    public function register($data)
    {
        return User::replace()->insert($data);
    }
    public function findPhone($account)
    {
        $data = User::where(['account'=>$account])->select();
        return !$data->isEmpty();
    }
}
